#ifndef PANORAMA_DOWNLOADER_H_
#define PANORAMA_DOWNLOADER_H_

// Base class.
#include <boost/noncopyable.hpp>
// Members.
#include <string>
// Forward declarations.
class CompositeImageInterface;

class PanoramaDownloader : private boost::noncopyable {
  public:
    PanoramaDownloader(std::string id, std::string server, int timeout,
        std::string user_agent, int world_width, int world_height,
        int tile_width, int tile_height, int zoom);

    // Downloads a full panorama. Blocks execution until complete.
    int download(CompositeImageInterface* output) const;

  private:
    // Constructs the HTTP GET arguments.
    std::string tileUrl(int i, int j) const;

    // HTTP details.
    std::string id_;
    std::string server_; 
    int timeout_;
    std::string user_agent_;
    // Panorama dimensions.
    int world_width_;
    int world_height_;
    int tile_width_;
    int tile_height_;
    int zoom_;
};

#endif
